export default function() {
  var docEl = document.documentElement
  var elTable = docEl.getElementsByClassName('el-table')
  var clientWidth = docEl.clientWidth
  if (!clientWidth) return
  // console.log(10 * (clientWidth / 1660))
  const fontSiz = 10 * (clientWidth / 1680)
  if (fontSiz >= 8) {
    docEl.style.fontSize = fontSiz + 'px'// 计算并转换rem
  } else {
    docEl.style.fontSize = '8px'
  }
  // 对table 的内部结构更改
  for (var i = 0; i < elTable.length; i++) {
    elTable[i].getElementsByClassName('el-table__body-wrapper')[0].style.height = (elTable[i].clientHeight - elTable[i].getElementsByClassName('el-table__header-wrapper')[0].clientHeight - 10) + 'px!important'
  }
}
